program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  n, i, j, r, a, b, c: integer;
begin
  readln(n);
  write('   ');
  writeln(1);
  a:=1;
  b:=1;
  c:=1;
  for i:=1 to n do
  begin
    for j:=0 to i do
    begin
      if (j=0) then
        write(1:4);
      if (j>0) or (j<0) then
      begin
        if (i-j>0) then
        begin
          for r:=1 to i do
            a:=a*r;
          for r:=1 to j do
            b:=b*r;
          for r:= 1 to i-j do
            c:=c*r;
          write(a/b/c:4:0);
        end;
        if (i=j) then
          writeln(1:4);
      end;
      a:=1;
      b:=1;
      c:=1;
    end;
    a:=1;
    b:=1;
    c:=1;
  end;
  readln;
end.
 